<?php namespace Admin\Controller; 

use Admin\Model\Admin;
//修改个人资料
class MyController extends AuthController{

	protected $db;
	//构造函数
	public function __init()
	{
		$this->db = new Admin;
	}
	
    //修改密码
    public function password(){
    	if(IS_POST){
    		if($this->db->changePassword()){
    			$this->success('密码修改成功');
    		}else{
    			$this->error($this->db->getError());
    		}
    	}else{
    		 View::make();
    	}
      
    }
}
